package com.info.zhiduoduo.repository.entity.company;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 企业申请退款表
 */
@Data
@Accessors(chain = true)
@TableName("zdd_enterprise_refund")
public class EnterpriseRefund extends Model<EnterpriseRefund> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("企业id")
    @TableField("compid")
    private Integer compId;

    @ApiModelProperty("金额")
    @TableField("amount_of_money")
    private BigDecimal amountOfMoney;

    @ApiModelProperty("退款类型 1:银行账户 2:支付宝账户")
    @TableField("type")
    private Integer type;

    @ApiModelProperty("企业支付方式Id")
    @TableField("pay_id")
    private Integer payId;

    @ApiModelProperty("支付方式名称")
    @TableField(exist = false)
    private String payName;

    @ApiModelProperty("支付方式别名")
    @TableField(exist = false)
    private String payNameAlias;

    @ApiModelProperty("状态 1：待处理  2：已撤销  3：已退款")
    @TableField("state")
    private Integer state;

    @ApiModelProperty("上传回单")
    @TableField("upload_receipt")
    private String uploadReceipt;

    @ApiModelProperty("操作者id")
    @TableField("operators_id")
    private Integer operatorsId;

    @ApiModelProperty("确认退款时间")
    @TableField("confirm_refund_time")
    private Date confirmRefundTime;

    @ApiModelProperty("撤销原因")
    @TableField("reason_for_cancellation")
    private String reasonForCancellation;

    @ApiModelProperty("创建时间")
    private Date createtime;

    @ApiModelProperty("修改时间")
    private Date updatetime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
